#ifndef _BUFFER_H
#define _BUFFER_H

#include "main.h"
#include "stdarg.h"
#include "stdio.h"
#include "string.h"

#define NUM 10
#define RX_MAX 256
#define BUFF_MAX_SIZE 2048

typedef struct 
{
    uint8_t *start;
    uint8_t *end;
}URX_Block;

typedef struct
{
    uint16_t  cnt;
    URX_Block BUFF_Clr[NUM];
    URX_Block *RX_IN;
    URX_Block *RX_OUT;
    URX_Block *RX_END;
}URX_CLR;

extern URX_CLR UCLR;
void URx_PtrInit(void);
void Data_processing(void);
void USART_Init(void);
void UART_IdleCallback(UART_HandleTypeDef *huart);
void u1_printf(char *format , ...);

#endif
